<template>
  <div class="risk-item">
    <div class="risk-item__left">
      <slot name="icon"></slot>
      <span class="risk-item__left-label">{{ label }}</span>
    </div>
    <div class="risk-item__right">{{ value }}</div>
  </div>
</template>

<script setup lang="ts">
defineOptions({
  name: "risk-item",
});

withDefaults(
  defineProps<{
    label: string;
    value: string;
  }>(),
  {}
);
</script>

<style lang="less">
.risk-item {
  display: flex;
  background: #f5f5f5;
  border-radius: 16px;
  padding: 10px 8px;
  align-items: center;
  box-sizing: border-box;
  gap: 28px;
  flex: 0 0 auto;

  animation-name: moving;
  animation-play-state: running;
  animation-timing-function: linear;
  will-change: transform;
  &__left {
    display: flex;
    align-items: center;
    gap: 8px;
    &-label {
      font-weight: 400;
      font-size: 24px;
      color: #000000;
      line-height: 26px;
    }
  }
  &__right {
    font-weight: 400;
    font-size: 24px;
    color: #8b8b8b;
    line-height: 26px;
  }
}
</style>
